//I've put the checkAndRunCommand method here for ease of use, and since it'd 
//be mostly / only used by the player, which is only talked to with levels.
package com.sjsayers.jtbae.core;

import com.sjsayers.jtbae.fight.Arena;
import com.sjsayers.jtbae.input.ConsoleHandle;

public class SuperLevel {
	/** This is for the combat needed in each level. */
	public Arena arena = new Arena();
	/** this is for the movement */
	public Movement move = new Movement();
	/** This is for managing user Input/Output. */
	public ConsoleHandle ch = new ConsoleHandle();
	
	/**
	 * This is the command for checking what the user said, then running it.
	 * It currently supports movement types and help
	 * @param userInput what the user said, pairs up with ConsoleHandle's getInput.
	 */
	public void checkAndRunCommand(String userInput){
		
		//This is all the commands that the user can enter.
		if(userInput.equalsIgnoreCase("north") || userInput.equalsIgnoreCase("up")){
			move.moveNorth();
		}
		else if(userInput.equalsIgnoreCase("south") || userInput.equalsIgnoreCase("down")){
			move.moveSouth();
		}
		else if(userInput.equalsIgnoreCase("west") || userInput.equalsIgnoreCase("left")){
			move.moveWest();
		}
		else if(userInput.equalsIgnoreCase("east") || userInput.equalsIgnoreCase("right")){
			move.moveEast();
		}
		else if(userInput.equalsIgnoreCase("?") || userInput.equalsIgnoreCase("help")){
			System.out.println("The generic commands :\n" +
					"north => up \n" +
					"south => down \n" +
					"west => left \n" +
					"east => right \n");
		}
		else {
			System.out.println("Currently that command is not implemented!");
		}
}
}
